<template>
  <div class="GoodsDesc">
    <!-- 标题 -->
    <h4>{{DescList.title}}</h4>
    <hr />
    <!-- 图文内容 -->
    <div class="content" v-html="DescList.content"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      id: this.$route.params.id,
      DescList: []
    };
  },
  created() {
    this.getgoodsDesc();
  },
  methods: {
    // 获取图文介绍数据
    getgoodsDesc() {
      this.$http.get("api/goods/getdesc/" + this.id).then(result => {
        // console.log(result);
        if (result.data.status === 0) {
          this.DescList = result.data.message[0];
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
.GoodsDesc {
  text-align: center;
  h4 {
    font-size: 16px;
    margin: 20px 0;
    color: dodgerblue;
  }
  .content {
    /deep/ img {
      width: 100%;
    }
  }
}
</style>
